<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>含光</title>
    <script src="./assets/js/common.js"></script>
    <script src="./assets/js/marked.min.js"></script>
    <link rel="stylesheet" type="text/css" href="./assets/css/common.css">
    <style>
        html,
        body {
            height: auto;
            min-height: 100%;
        }
        
        #content {
            display: flex;
            flex-flow: column nowrap;
            justify-content: center;
            align-items: center;
            text-align: center;
        }
    </style>
</head>

<body>

    <body>
        <div id="content"></div>
    </body>


    <script>
        //读取配置列表
        function readPostList(responseText) {
            postList = JSON.parse(responseText);
            if (postList) {
                for (let i in postList) {
                    let p = document.createElement('p');
                    let a = document.createElement('a');
                    a.innerHTML = '[' + postList[i].category + ']--' + postList[i].title;
                    a.setAttribute('href', "content.html?" + postList[i].name);
                    p.appendChild(a);
                    document.getElementById("content").appendChild(p);
                }
            }
        }
        request(config.postList, readPostList);
    </script>
</body>

</html>